<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMenuTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('menu', function (Blueprint $table) {
            $table->increments('id')->comment("菜单ID");
            $table->string('title',30)->comment("菜单名称");
            $table->integer('parent_id')->comment("上级资源ID");
            $table->integer('psort')->comment("排序，升序排序");
            $table->tinyInteger('status')->comment("菜单状态：1=启用；0=关闭");
            $table->string('icon',64)->comment("顶级菜单图标");
            $table->string('module_route',50)->comment('模型路由');
            $table->string('menu_route',100)->comment("相对admin模块的路由  #表示不是链接");
            $table->string('routes',500)->comment("此菜单下，授予多个路由，则每行写一个路由");
            $table->string('description',200)->comment("资源描述");
            $table->tinyInteger('is_delete',2)->default('1')->comment("是否删除，1正常2删除");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('menu');
    }
}
